Replace size() == 0 with empty() when more readable.
authorRobert Lipe <robertlipe@gpsbabel.org>
Mon, 3 Dec 2018 06:05:08 +0000 (00:05 -0600)
committerRobert Lipe <robertlipe@gpsbabel.org>
Mon, 3 Dec 2018 06:05:08 +0000 (00:05 -0600)
exif.cc
main.cc

diff --git a/exif.cc b/exif.cc
index 639e4147c9ff8f38d39816a2734a8c4c4d4f947c..f399446b09cc86700dc553667cce89482c22c345 100644 (file)
--- a/exif.cc
+++ b/exif.cc
@@ -1112,7 +1112,7 @@ exif_put_value(const int ifd_nr, const uint16_t tag_id, const uint16_t type, con
 
   if (BYTE_TYPE(type)) {
     assert(item_size == 1);
-    if (tag->data.size() == 0) {
+    if (tag->data.empty()) {
       tag->data.append(QByteArray());
     }
     QByteArray qba = tag->data.at(0).toByteArray();
diff --git a/main.cc b/main.cc
index 575659be3a41d56bbc670fba7c65b16b58c44f6e..8990f1a24be745901749b75787680deba441ad6c 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -558,7 +558,7 @@ main(int argc, char* argv[])
       optarg = FETCH_OPTARG;
       qargs_stack.push(QargStackElement(argn, qargs));
       qargs = load_args(optarg, qargs.at(0));
-      if (qargs.size() == 0) {
+      if (qargs.empty()) {
         QargStackElement ele = qargs_stack.pop();
         argn = ele.argn;
         qargs = ele.qargs;